home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
comm
/
tmhst24a.zip
/
SCREENIO.SCR
< prev
next >
Wrap
Text File
|
1990-12-22
|
5KB
|
210 lines
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; SCREENIO toolbox
; use #include "SCREENIO.SCR" in source file
integer EchoTolocal, EchoToRemote, ANSILOCAL, ANSIREMOTE
; set EchoToLocal, EchoToRemote, ANSILOCAL or ANSIREMOTE
; in source file to either TRUE (1) or FALSE (0) depending
; on whether you wish to "print" to local screen or "put" to remote
; the Ansi variables set ANSI characters true or false
string FGBLACK,FGBLUE,FGGREEN,FGCYAN,FGRED,FGYELLOW,FGWHITE
string BKBLACK,BKBLUE,BKGREEN,BKCYAN,BKRED,BKYELLOW,BKWHITE
FGBLACK = "^[[30m" ; define foreground color code in ANSI order
FGRED = "^[[31m"
FGGREEN = "^[[32m"
FGYELLOW = "^[[33m"
FGBLUE = "^[[34m"
FGMAGENTA = "^[[35m"
FGCYAN = "^[[36m"
FGWHITE = "^[[37m"
BKBLACK = "^[[40m" ; define background color code in ANSI order
BKRED = "^[[41m"
BKGREEN = "^[[42m"
BKYELLOW = "^[[43m"
BKBLUE = "^[[44m"
BKMAGENTA = "^[[45m"
BKCYAN = "^[[46m"
BKWHITE = "^[[47m"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Echo s
; function: print the string <s> to local screen if <EchoToLocal> is TRUE
; and send <s> to remote system if <EchoToRemote> is TRUE.
;
Procedure Echo string s
if EchoToLocal ; print to local
print s,
endif
if EchoToRemote ; put to remote system
put s,
endif
EndProc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; EchoInt i
; function: print the integer <i> to local screen if <EchoToLocal> is TRUE
; and send <i> to remote system if <EchoToRemote> is TRUE
;
Procedure EchoInt integer i
if EchoToLocal
print i, ; print to local screen
endif
if EchoToRemote
put i, ; put to remote system
endif
EndProc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; EchoColor color
; function: set foreground colour
;
Procedure EchoColor string color ; FGWHITE etc.
if EchoToLocal
If ANSILOCAL
print color,
else
print "",
endif
endif
if EchoToRemote
If ANSIREMOTE
put color,
else
put "",
endif
endif
EndProc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; EchoBkColor bkcolor
; function: set background colour
;
Procedure EchoBkColor string bkcolor
if EchoToLocal
If ANSILOCAL
print bkcolor,
else
print "",
endif
endif
if EchoToRemote
If ANSIREMOTE
put bkcolor,
else
put "",
endif
endif
EndProc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; EchoNormal
; function: set normal intensity and reset color to white on black
; remark: to turn off high intensity only, you must use three
; statements, where <foreground> and <background> are
; foreground and background colors, because there is
; no ANSI code to turn off high intensity.
; EchoNomal
; EchoColor foreground
; EchoBkColor background
;
Procedure EchoNormal
if ANSILOCAL
Echo "^[[0m" ; ANSI code <esc>[0]
else
Echo ""
endif
if ANSIREMOTE
Echo "^[[0m"
else
Echo ""
endif
EndProc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; EchoHiLite
; function: set high intensity
;
Procedure EchoHiLite
if ANSILOCAL
Echo "^[[1m" ; ANSI code <esc>[1m
else
Echo ""
endif
if ANSIREMOTE
Echo "^[[1m"
else
Echo ""
endif
EndProc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; EchoBlink
; function: set blink attribute
;
Procedure EchoBlink
if ANSILOCAL
Echo "^[[5m" ; ANSI code <esc>[5m
else
Echo ""
endif
if ANSIREMOTE
Echo "^[[5m"
else
Echo ""
endif
EndProc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; EchoReverse
; function: set reverse attribute
;
Procedure EchoReverse
if ANSILOCAL
Echo "^[[7m" ; ANSI code <esc>[7m
else
Echo ""
endif
if ANSIREMOTE
Echo "^[[7m"
else
Echo ""
endif
EndProc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; EchoClearScreen
; function: clear screen and home cursor
;
Procedure EchoClearScreen
if ANSILOCAL
Echo "^[[2J" ; ANSI code <esc>[2J
else
Echo ""
endif
if ANSIREMOTE
Echo "^[[2J"
else
Echo ""
endif
EndProc